import { SingleInstance } from './singleinstance';


async function run (){
    const driver = SingleInstance.create_driver();

    await driver.get('https://login.anjuke.com/login/form');

    // 1. iframe webelement;
    const iframe = await driver.findElement({css:'iframe#iframeLoginIfm'})

    await driver.switchTo().frame(iframe);

    const phone = await driver.findElement({id:"phoneIpt"});
    await phone.sendKeys("1234567")


    // 从iframe切换出来
    await driver.switchTo().defaultContent();
    const ele =  await driver.findElement({css:'a[rel="nofollow"]'});
    await ele.click();
}

run();